<?php

include '../../configs/global.php';
$data = $_GET;
$id = $data['id'];

//定义一个返回数组
$ajax_res = array();
$sql = "DELETE FROM admin WHERE id='$id'";


$r1 = $pdo->exec($sql);
if ($r1) {
    $ajax_res['code'] = 200;
    $ajax_res['info'] = '删除成功';
} else {
    $ajax_res['code'] = 300;
    $ajax_res['info'] = '删除失败,请稍后再试！';
}
echo json_encode($ajax_res);
